package com.zeei.ems;


import com.zeei.ems.base.anno.EnableTxManager;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
@ComponentScan(basePackages = {"com.zeei.ems.*"})
@MapperScan("com.zeei.ems..*.dao")
@EnableTransactionManagement
@EnableTxManager(txMethodTimeOut = 10)
public class EmsApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(EmsApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(EmsApplication.class);
    }
}
